package org.zxp.word;

import com.deepoove.poi.XWPFTemplate;

import java.io.IOException;
import java.util.HashMap;

/**
 * @program: effectiveJava
 * @description:
 * @author: X-Pacific zhang
 * @create: 2020-06-08 16:14
 **/
public class WordTemplate {
    public static void main(String[] args) throws IOException {
        XWPFTemplate.compile("D://ori.docx").render(new HashMap<String, Object>(){{
            put("v1", "1111111");
            put("v2", "2222222");
            put("v3", "3333333");
        }}).writeToFile("D://target.docx");
    }
}
